<h:outputScript
  xmlns="http://www.w3.org/1999/xhtml"
  xmlns:h="http://java.sun.com/jsf/html"
  target="#{pageJsTarget}">
  function confirmDeleteDocuments() {
    return confirm("#{messages['label.documents.confirmDeleteDocuments']}");
  }
  function confirmUndeleteDocuments() {
    return confirm("#{messages['label.documents.confirmUndeleteDocuments']}");
  }
  function confirmDeleteDocumentsForever() {
    return confirm("#{messages['label.documents.confirmDeleteDocumentsForever']}");
  }
  function confirmEmptyTrash() {
    return confirm("#{messages['label.documents.confirmEmptyTrash']}");
  }
  function confirmDeleteTask() {
    return confirm("#{messages['label.review.confirmDeleteTask']}");
  }
  function confirmRemoveFiles(file) {
    var message = "#{messages['label.documents.confirmRemoveFiles']} '" + file + "'#{messages['label.documents.confirmRemoveFilesEnd']}";
    return confirm(message);
  }
</h:outputScript>